home *** CD-ROM | disk | FTP | other *** search
/ MacGames Sampler / PHT MacGames Bundle.iso / MacSource Folder / Samples from the CD / Editors / emacs / Emacs-1.14b1 / lisp / mac / Memory.el < prev    next >
Encoding:
Text File  |  1994-02-22  |  2.3 KB  |  99 lines  |  [TEXT/EMAC]

  1. ;;;
  2. ;;; This file is part of a Macintosh port of GNU Emacs.
  3. ;;;
  4. ;;; GNU Emacs is distributed in the hope that it will be useful,
  5. ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  6. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  7. ;;; GNU General Public License for more details.
  8. ;;;
  9.  
  10. ;#pragma parameter __A0 NewPtr(__D0)
  11. ;pascal Ptr NewPtr(Size byteCount)
  12. ;    = 0xA11E; 
  13. (deftrap NewPtr ("a11e")
  14.   ((byteCount long d0))
  15.   (long a0))
  16.  
  17. ; #pragma parameter __A0 NewPtrClear(__D0)
  18. ; pascal Ptr NewPtrClear(Size byteCount)
  19. ;    = 0xA31E; 
  20. (deftrap NewPtrClear ("a31e")
  21.   ((byteCount long d0))
  22.   (long a0))
  23.  
  24. ;#pragma parameter __A0 NewHandle(__D0)
  25. ;pascal Handle NewHandle(Size byteCount)
  26. ;    = 0xA122; 
  27. (deftrap NewHandle ("a122")
  28.   ((byteCount long d0))
  29.   (long a0))
  30.  
  31. ; #pragma parameter __A0 NewHandleClear(__D0)
  32. ; pascal Handle NewHandleClear(Size byteCount)
  33. ;    = 0xA322; 
  34. (deftrap NewHandleClear ("a322")
  35.   ((byteCount long d0))
  36.   (long a0))
  37.  
  38. ;#pragma parameter DisposPtr(__A0)
  39. ;pascal void DisposPtr(Ptr p)
  40. ;    = 0xA01F; 
  41. (deftrap DisposPtr ("a01f")
  42.   ((p long a0))
  43.   nil)
  44.  
  45. ;#pragma parameter DisposHandle(__A0)
  46. ;pascal void DisposHandle(Handle h)
  47. ;    = 0xA023; 
  48. (deftrap DisposHandle ("a023")
  49.   ((h long a0))
  50.   nil)
  51.  
  52. ;#pragma parameter HLock(__A0)
  53. ;pascal void HLock(Handle h)
  54. ;    = 0xA029; 
  55. (deftrap HLock ("a029")
  56.   ((h long a0))
  57.   nil)
  58.  
  59. ; #pragma parameter HUnlock(__A0)
  60. ; pascal void HUnlock(Handle h)
  61. ;    = 0xA02A; 
  62. (deftrap HUnlock ("a02a")
  63.   ((h long a0))
  64.   nil)
  65.  
  66. ; In Memory.h, this has no pragma directive, so there must be
  67. ; glue for this in MacTraps.  I don't know why.
  68. ; pascal Size GetHandleSize(Handle h); 
  69. (deftrap GetHandleSize ("a025")
  70.   ((h long a0))
  71.   (long d0))
  72.  
  73. ; #pragma parameter SetHandleSize(__A0,__D0)
  74. ; pascal void SetHandleSize(Handle h,Size newSize)
  75. ;    = 0xA024; 
  76. (deftrap SetHandleSize ("a024")
  77.   ((h long a0)
  78.    (newSize long d0))
  79.   nil)
  80.  
  81. (deftrap MemError ("3038" "0220") ; move.w 0x220,d0
  82.   nil
  83.   (short d0))
  84.  
  85. ; #pragma parameter __D0 HGetState(__A0)
  86. ; pascal char HGetState(Handle h)
  87. ;     = 0xA069; 
  88. (deftrap HGetState ("a069")
  89.   ((h long a0))
  90.   (char d0))
  91.  
  92. ; #pragma parameter HSetState(__A0,__D0)
  93. ; pascal void HSetState(Handle h,char flags)
  94. ;     = 0xA06A; 
  95. (deftrap HSetState ("a06a")
  96.   ((h long a0)
  97.    (flags char d0))
  98.   nil)
  99.